<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>增加句柄简化代码量</title>
</head>
<body>
    <button id="btn">按钮</button>
    <script>
        document.getElementById("btn").addEventListener("click", function () {
            alert("hello world")
        })
        document.getElementById("btn").addEventListener("mouseout", function () {
            alert("hello world1")
        })
    </script>
</body>
</html>